<%@taglib prefix="security" uri="http://www.springframework.org/security/tags" %>

<div class="top-bar">
<!-- 	<div class="top-left-bar"></div> -->
<!-- 	<div class="top-center-bar"></div> -->
<!-- 	<div class="top-right-bar"> -->
		<security:authorize access="isAuthenticated()">
			<ul class="nav navbar-nav col-sm-12 col-xs-12 scrollable-menu logged">
				<li class="dropdown dropdown-user" id="usermenu">
					<a href="#" class="dropdown-toggle" data-toggle="dropdown">
						<img alt="Test" height="28" src="https://a0.muscache.com/im/users/37689192/profile_pic/1436203198/original.jpg?aki_policy=profile_small" width="28" class="image_1pa4v1p">
						<security:authentication property="principal.firstname" /> <security:authentication property="principal.lastname" />
					</a>
		            <ul class="dropdown-menu dropdown-menu-right dropdown-sub-menu profile">
		                <li>
		                    <div class="row twocol">
		                        <ul class="list-unstyled b-right col-lg-6 col-md-6 col-sm-6 col-xs-12">
		                        	<li class="dropdown-header">{{'page.topbar.areaprivata' | translate}}</li>
		                        	<li class="dropdown-link">
		                        		<a href="<%=request.getContextPath()%>/tankCtrl/myTank" title="{{'page.topbar.areaprivata.mytanks' | translate}}">
		                        			{{'page.topbar.areaprivata.mytanks' | translate}}
		                        		</a>
		                        	</li>
		                        </ul>
		                        <ul class="list-unstyled col-lg-6 col-md-6 col-sm-6 col-xs-12" id="social-logged">
		                        	<li>
		                        		{{'page.topbar.areaprivata.hi' | translate}} 
		                        		<strong><security:authentication property="principal.firstname" /></strong>
		                        		{{'page.topbar.areaprivata.comma' | translate}}
			                        	<br>{{'page.topbar.areaprivata.welcome' | translate}}<br>
		                        	</li>
		                        </ul>
		                    </div>
		                </li>
		                <li class="divider"></li>
		                <li>
		                	<a href="<%=request.getContextPath()%>/logout">
								<div class="form-actions">
									<input type="submit" class="btn btn-block btn-primary btn-default" title="{{'page.topbar.areaprivata.logout' | translate}}" 
											value="{{'page.topbar.areaprivata.logout' | translate}}">
								</div>
		                	</a>
		                </li>
		            </ul>
		        </li>
				<li class="dropdown dropdown-setting" ng-controller="SettingsController">
					<a href="#" class="dropdown-toggle" data-toggle="dropdown">
						<img src="<%=request.getContextPath()%>/images/settings.png">
					</a>
		            <ul class="dropdown-menu dropdown-menu-right dropdown-sub-menu strumenti">
		            	<li>
		                	<a href="<%=request.getContextPath()%>/settingsCtrl/viewProfile" title="{{'page.topbar.settings.viewprofile' | translate}}">
		                		{{'page.topbar.settings.viewprofile' | translate}}
		                	</a>
		                </li>
		                <li>
		                	<a href="<%=request.getContextPath()%>/settingsCtrl/changePassword" title="{{'page.topbar.settings.changepassword' | translate}}">
		                		{{'page.topbar.settings.changepassword' | translate}}
		                	</a>
		                </li>
		                <li>
		                	<a href="<%=request.getContextPath()%>/settingsCtrl/fishWishlist" title="{{'page.topbar.settings.fishwishlist' | translate}}">
		                		{{'page.topbar.settings.fishwishlist' | translate}}
		                	</a>
		                </li>
		                <li>
		                	<a href="<%=request.getContextPath()%>/settingsCtrl/plantWishlist" title="{{'page.topbar.settings.plantwishlist' | translate}}">
		                		{{'page.topbar.settings.plantwishlist' | translate}}
		                	</a>
		                </li>
		            </ul>
		        </li>
		        <li class="dropdown dropdown-lang" ng-controller="TranslateController">
					<a href="#" class="dropdown-toggle" data-toggle="dropdown">{{language}}</a>
		            <ul class="dropdown-menu dropdown-menu-right dropdown-sub-menu language">
		                <li><a href="#" ng-click="changeLanguageApplication('it')">IT</a></li>
		                <li><a href="#" ng-click="changeLanguageApplication('en')">EN</a></li>
		            </ul>
		        </li>
			</ul>
		</security:authorize>	
		<security:authorize access="!isAuthenticated()">
			<ul class="nav navbar-nav col-sm-12 col-xs-12 scrollable-menu login">
				<li class="dropdown" id="usermenu">
					<a href="<%=request.getContextPath()%>/login" title="{{'page.topbar.accedi' | translate}}">{{'page.topbar.accedi' | translate}}</a>
		        </li>
			</ul>
		</security:authorize>
<!-- 	</div> -->
</div>